<?php
  /*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Released under the GNU General Public License
  */

  require('includes/application_top.php');

  // Added for information pages
  if(!isset($HTTP_GET_VARS['info_id']) || !tep_not_null($HTTP_GET_VARS['info_id'])) {
  	$title = 'Sorry. Page Not Found.';
		$breadcrumb->add($INFO_TITLE, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $HTTP_GET_VARS['info_id'], 'NONSSL'));
	} else {
	$info_id = $HTTP_GET_VARS['info_id'];
  $information_query = tep_db_query("SELECT info_title, description FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='" . $info_id . "'");
  $information = tep_db_fetch_array($information_query);
  	$title = stripslashes($information['info_title']);
  	$description = stripslashes($information['description']);

  // Added as noticed by infopages module
  if (!preg_match("/([\<])([^\>]{1,})*([\>])/i", $description)) {
  	$description = str_replace("\r\n", "<br>\r\n", $description); 
  }

  	$breadcrumb->add($title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $HTTP_GET_VARS['info_id'], 'NONSSL'));
	}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<? /*
<?php echo $title;?>
*/?>
<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
  	<td valign="top">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
	</td>
<!-- body_text //-->
    <td width="100%" valign="top">
		<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td> 

<? tep_draw_heading_top();?>

									<table cellpadding="0" cellspacing="0" class="b box_width_cont">
										<tr><td><h1><?php echo $title;?></h1></td></tr>
										<tr><td style="height:18px;"></td></tr>
									</table>
									
<? tep_draw_heading_top_1();?>									
		
						<table cellpadding="0" cellspacing="0" border="0">
							<tr><td style="padding:10px 0px 0px 10px;"><?php echo $description; ?></td></tr>
						</table>
					
<?php tep_draw_heading_bottom_1();?>					
		
<?php tep_draw_heading_bottom();?>
	
		</table>
	
	</td>
<!-- body_text_eof //-->
    <td valign="top">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
    </td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>